package cn.edu.sbs.talent.shiro.entity;

import cn.edu.sbs.talent.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "账户")
@TableName(value = "Account", keepGlobalPrefix = true)
public class Account extends BaseEntity {

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 是否启用 (0 禁用, 1 启用)
     */
    private boolean enabled;

    /**
     * 是否登录过 (0 从未登录, 1 已经登录过)
     */
    private Boolean loggedIn;

    /**
     * 账户所属角色, 瞬态属性
     */
    private transient List<Role> roles;

}
